package com.khalil.kkadmin.ai.rag.knowledgeset.entity;

import com.khalil.kkadmin.infrastructure.jpa.domain.EntityBase;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners(AuditingEntityListener.class)
@Table(name = "rag_knowledge_segment")
@Entity
@EqualsAndHashCode(callSuper = true)
@Data
public class RagKnowledgeSegment extends EntityBase<Long> {

    private Long knowledgeSetId;

    private Long knowledgeTextId;

    @Column(columnDefinition = "text")
    private String metadata;

    @Column(columnDefinition = "text")
    private String text;
}
